Ext.define('HIT.view.MdataClientEditPanel', {
    extend: 'Ext.form.Panel',
    alias: 'widget.mdataclienteditpanel',
    height: 560,
    width: 620,
    overlapHeader: false,
    preventHeader: true,
    autoScroll: true,
    layout: {
        type: 'absolute'
    },
    title: Share.T('修改客户基本信息'),

    initComponent: function() {
        var me = this;
        Ext.applyIf(me, {
            items: [
				{
					xtype: 'fieldset',
					height: 220,
					margin: '10 10 10 10',
                    padding: '10 10 10 10',
                    title: Share.T('客户基本信息设置'),
                    layout: {
                        type: 'absolute'
                    },
					items: [
						{
							xtype: 'hiddenfield',
							id: 'mdata-functionId',
							value: 2
						},
						{
			                   xtype: 'hiddenfield',
			                   id: 'hiddenID',
			                   value: -1
			             },
						{
							xtype: 'textfield',
							tabIndex:1,
							x: 10,
							y: 20,
							width:234,
							maxLength : 20,
							id:'mdata-client-code-edit',
							fieldLabel: Share.T('客户代码'),
			                emptyText: Share.T('请输入客户代码'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:2,
							x: 270,
							y: 20,
							width:234,
							maxLength : 200,
							id:'mdata-client-suport-edit',
							style: 'opacity: 10;',
							fieldLabel: Share.T('客户名称'),
		                    allowBlank: false,
		                    blankText: Share.T('客户名称不能为空'),
		                    emptyText: Share.T('请输入客户名称'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:6,
							x: 270,
							y: 100,
							width:234,
							maxLength : 20,
							id:'mdata-client-tax-edit',
							fieldLabel: Share.T('税&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号'),
			                emptyText: Share.T('请输入税号'),
				            regex: /^(\d|\w)+$/,
				            regexText: Share.T('请输入有效的税号'),
				            msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:3,
							x: 10,
							y: 60,
							width:234,
							maxLength : 160,
							id:'mdata-client-bank-edit',
							fieldLabel: Share.T('客户开户行'),
		                    emptyText: Share.T('请输入客户开户行'),
		                    msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:5,
							x: 10,
							y: 100,
							width:234,
							maxLength : 160,
							id:'mdata-client-specialbank-edit',
							fieldLabel: Share.T('客户账号'),
			                emptyText: Share.T('请输入客户账号'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:4,
							x: 270,
							y: 60,
							width:234,
							maxLength : 500,
							id:'mdata-client-address-edit',
							fieldLabel: Share.T('客户地址'),
			                emptyText: Share.T('请输入客户地址'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:7,
							x: 10,
							y: 140,
							width:234,
							maxLength : 30,
							id:'mdata-client-tel-edit',
							fieldLabel: Share.T('客户电话'),
			                emptyText: Share.T('请输入客户电话'),
			                regex: /^\d(\d|-)*\d$/,
			                regexText: Share.T('请输入有效的电话号码'),
			                msgTarget  : 'side'
						},
						//新增字段，在发票类型表里
						{
				        	xtype : 'combobox',
				        	x:270,
				        	y:140,
				        	width:234,
						//	triggerAction : 'query',
							editable : false,
							fieldLabel : Share.T('发票类型'),
							id : 'edit-invtype',
							valueField : 'value',
							displayField : 'text',
							store : new Ext.data.JsonStore({
 								proxy: { 
 									type: 'ajax', 
 									url : ctx + '/getInvoiceType1',
 									params:{        	                	
 									},
 									reader: { 
 										type: 'json', 
 										totalProperty: '', 
 										root: '' 
 									} 
 								}, 
 							fields:['text','value'], 
            	            autoLoad:true 
				          })
						}
					]
				},
				{
					xtype: 'fieldset',
					height: 260,
					y:240,
					margin: '10 10 10 10',
                    padding: '10 10 10 10',
                    title: Share.T('客户附加信息设置'),
                    layout: {
                        type: 'absolute'
                    },
					items: [
						{
							xtype: 'textfield',
							tabIndex:8,
							x: 10,
							y: 20,
							width:234,
							maxLength : 200,
							id:'mdata-client-ck01-edit',
							fieldLabel: Share.T('参考字段1'),
			                emptyText: Share.T('请输入参考字段1'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:9,
							x: 10,
							y: 60,
							width:234,
							maxLength : 200,
							id:'mdata-client-ck02-edit',
							fieldLabel: Share.T('参考字段2'),
			                emptyText: Share.T('请输入参考字段2'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:10,
							x: 10,
							y: 100,
							width:234,
							maxLength : 200,
							id:'mdata-client-ck03-edit',
							fieldLabel: Share.T('参考字段3'),
			                emptyText: Share.T('请输入参考字段3'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:11,
							x: 10,
							y: 140,
							width:234,
							maxLength : 200,
							id:'mdata-client-ck04-edit',
							fieldLabel: Share.T('参考字段4'),
			                emptyText: Share.T('请输入参考字段4'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'textfield',
							tabIndex:12,
							x: 10,
							y: 180,
							width:234,
							maxLength : 200,
							id:'mdata-client-ck05-edit',
							fieldLabel: Share.T('参考字段5'),
			                emptyText: Share.T('请输入参考字段5'),
			                msgTarget  : 'side'
						},
						{
							xtype: 'checkbox',
							tabIndex:13,
							x: 270,
							y: 20,
							maxLength : 200,
							id:'mdata-client-ck06-edit',
							fieldLabel: Share.T('参考字段6'),
							msgTarget  : 'side'
						},
						{
							xtype: 'checkbox',
							tabIndex:14,
							x: 270,
							y: 60,
							maxLength : 200,
							id:'mdata-client-ck07-edit',
							fieldLabel: Share.T('参考字段7'),
							msgTarget  : 'side'
						},
						{
							xtype: 'checkbox',
							tabIndex:15,
							x: 270,
							y: 100,
							maxLength : 200,
							id:'mdata-client-ck08-edit',
							fieldLabel: Share.T('参考字段8'),
							msgTarget  : 'side'
						},
						{
							xtype: 'checkbox',
							tabIndex:16,
							x: 270,
							y: 140,
							maxLength : 200,
							id:'mdata-client-ck09-edit',
							fieldLabel: Share.T('参考字段9'),
							msgTarget  : 'side'
						},
						{
							xtype: 'checkbox',
							tabIndex:17,
							x: 270,
							y: 180,
							maxLength : 200,
							id:'mdata-client-ck10-edit',
							fieldLabel: Share.T('参考字段10'),
							msgTarget  : 'side'
						}
					]
				}
            ]
        });

        me.callParent(arguments);
    }

});